<?php

require_once("view/SkinView.php");
require_once("Model/SkinHandler.php");

class SkinController{
		
	private $skinView;
	private $skinHandler;
	
	public function __construct(SkinHandler $skinHandler){
		$this->skinView = new SkinView();
		$this->skinHandler = $skinHandler;
	}
	
	public function doControll(){
		//Get user choice
		$UsersChoise = $this->skinView->getSkin();
		//Set user choice info handler
		$this->skinHandler->setSkin($UsersChoise);
		//Set choice into cookie
		$this->skinView->setSkinToCookie($UsersChoise);
		//Return div with skinlinks
		return $this->skinView->generateSkinOptionLinks();
	}
}